package com.leoman.dao;

import com.leoman.entity.Region;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 区
 * Created by Administrator on 2016/10/18 0018 下午 3:04.
 */
public interface RegionDao extends JpaRepository<Region, Integer>, JpaSpecificationExecutor<Region> {

    @Query("select a from Region a where a.city.id = ?1")
    List<Region> findListByCityId(Integer cityId);
}